using System;
using System.Collections.Generic;
using System.Text;
using Blazing.BusinessObjects;

using NUnit.Framework;
using TestClass = NUnit.Framework.TestFixtureAttribute;
using TestMethod = NUnit.Framework.TestAttribute;
using TestInitialize = NUnit.Framework.SetUpAttribute;
using TestCleanup = NUnit.Framework.TearDownAttribute;
using ClassInitialize = NUnit.Framework.TestFixtureSetUpAttribute;
using ClassCleanup = NUnit.Framework.TestFixtureTearDownAttribute;


namespace BusinessObjectTests
{
    [TestClass]
    public class SettingTests : NHibernateInMemoryTestFixtureBase
    {
        private void CheckValues(Setting obj, Setting newObj)
        {
            //check images are the same
            Assert.AreEqual(obj.Description, newObj.Description);
            Assert.AreEqual(obj.Name, newObj.Name);
            Assert.AreEqual(obj.Value, newObj.Value);

            Assert.AreEqual(obj.ID, newObj.ID);
            Assert.AreEqual(obj.RowStamp, newObj.RowStamp);
        }

        [TestMethod]
        [Ignore]
        public void TestCreate()
        {
            Setting obj = new Setting();
            obj.Description = "Setting";
            obj.Name = "Name";
            obj.Value = "Value";

            obj.Save();

            Setting obj2 = Setting.Load(obj.ID);
            CheckValues(obj, obj2);

            obj.Delete();
        }
    }
}
